import java.util.Scanner;

public class Target {
    public static void Find(int[] arr,int target){
        int i=0;
        for ( i = 0; i <= arr.length-1; i++) {
            for(int j=i;j<= arr.length-1;j++){
                if(arr[i]+arr[j]==target){
                    System.out.print("[");
                    System.out.println(i+","+j+"]");
                }
            }
        }
    }
    public static void main(String[] args) {
        int[] arr=new int[]{1,44,67,23,5};
        Scanner scanner=new Scanner(System.in);
        int target=scanner.nextInt();
        Find(arr,target);
    }
}
